package com.bwhx.eruler.dao.impl;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.bwhx.eruler.bean.Baofei;
import com.bwhx.eruler.bean.Page;
import com.bwhx.eruler.dao.BaofeiDAO;
@Repository
public class BaofeiDAOImpl extends BaseDaoImpl<Baofei> implements BaofeiDAO {
	
	public BaofeiDAOImpl() {
		this.setNs("com.bwhx.eruler.mapper.BaofeiMapper.");
	}

	@Override
	public List<Baofei> list(Page p) {
		return getSqlSession().selectList(this.getNs() + "list",p);
	}

	@Override
	public Integer count(Baofei baofei) {
		Object selectOne = getSqlSession().selectOne(this.getNs() + "count",baofei);
		if(null!=selectOne && selectOne instanceof Integer){
			return (int)selectOne;
		}
		return 0;
	}

	@Override
	public void del(String bfid) {
		getSqlSession().delete(this.getNs() + "delete",bfid);
		
	}

	


}
